<template>
  <div ref="box" style="with:600px; height: 400px" />
</template>

<script>
import * as Echarts from 'echarts'
import radarData from './radarData'
export default {
  name: 'Radar',
  data() {
    return {}
  },
  mounted() {
    this.echarts = Echarts.init(this.$refs.box)
    this.echarts.setOption(radarData)
  },
  created() {
    this.initData()
  },
  methods: {
    initData() {
      setTimeout(() => {
        const value1 = [10, 1, 100, 5, 100, 0]
        const value2 = [50, 50, 50, 50, 50, 10]

        radarData.series[0].data[0].value = value1
        radarData.series[0].data[1].value = value2

        this.echarts.setOption(radarData)
      }, 4000)
    }
  }

}

</script>

<style>

</style>
